<template>
  <el-container>
    <el-header height="5vh" class="content-header">
      <el-breadcrumb separator-class="el-icon-arrow-right">
        <el-breadcrumb-item class="breadcrumb-title">{{this.$route.name}}</el-breadcrumb-item>
        <template v-if="this.$route.name==='文件'">
          <el-breadcrumb-item class="breadcrumb-title" v-for="(item, index) in pathList" :key="index">
            <span @click="changePath(item)">
              {{item.folderName}}
            </span>
          </el-breadcrumb-item>
        </template>
      </el-breadcrumb>
      <UpLoad v-if="uploadFile"></UpLoad>
      <UpLoadPhoto v-if="upLoadPhoto"></UpLoadPhoto>
    </el-header>
    <el-main class="content-view">
      <slot></slot>
    </el-main>
  </el-container>
</template>

<script>
import UpLoad from '../file/UpLoad'
import UpLoadPhoto from '../file/UpLoadPhoto'
export default {
  name: "ViewBorder",
  components:{UpLoad,UpLoadPhoto},
  props:['uploadFile','upLoadPhoto'],
  computed:{
    pathList(){
      return this.$store.state.pathList
    }
  },
  methods:{
    changePath(folder){
      this.$store.commit("setFolder",folder)
    }
  }
}
</script>

